import React,{memo} from 'react'
import data from '@emoji-mart/data'
import Picker from '@emoji-mart/react'



function EmojiItem(props, ref){
  const I18n = {
    "search": "搜索",
    "search_no_results_1": "哦不！",
    "search_no_results_2": "没有找到相关表情",
    "pick": "选择一个表情…",
    "add_custom": "添加自定义表情",
    "categories": {
      "activity": "活动",
      "custom": "自定义",
      "flags": "旗帜",
      "foods": "食物与饮品",
      "frequent": "最近使用",
      "nature": "动物与自然",
      "objects": "物品",
      "people": "表情与角色",
      "places": "旅行与景点",
      "search": "搜索结果",
      "symbols": "符号"
    },
    "skins": {
      "choose": "选择默认肤色",
      "1": "默认",
      "2": "白色",
      "3": "偏白",
      "4": "中等",
      "5": "偏黑",
      "6": "黑色"
    }
  }
  const select = (e)=>{
    props.onEmojiSelect(e)
  }
  return <>
   <Picker data={data}
           i18n={ I18n}
           theme={"light"}
           previewPosition={"none"}
           searchPosition={"none"}
           onEmojiSelect={(e)=>select(e)}></Picker>
  </>
}

export  default  memo(EmojiItem);
